package com.bnlr.lrparking.appui.publish;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.bnlr.lrparking.R;
import com.bnlr.lrparking.appui.publish.openenter.OpenEnterActivity;
import com.bnlr.lrparking.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 选择身份
 */
public class ChoseIdentityActivity extends BaseActivity {
    @BindView(R.id.tv_nav_title)
    TextView tvTitle;
    private int fromTag;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chose_identity);
        ButterKnife.bind(this);
        Intent intent = getIntent();
        fromTag = intent.getIntExtra("from",0);
        tvTitle.setText("选择身份");
    }
    @OnClick({R.id.rl_person,R.id.rl_open})
    public void ciOnClick (View view) {
        switch (view.getId()) {
            case R.id.rl_person:  // 个人
                startActivity(new Intent(this, PublishActivity.class).putExtra("publish_tag",fromTag));
                break;
            case R.id.rl_open:    // 开发商
                startActivity(new Intent(this, OpenEnterActivity.class));
                break;
            default:              // Do nothing
                break;
        }
    }
}
